/* import React from 'react';
import ReactDOM from 'react-dom';

const element = <h1>hello wrold</h1>

ReactDOM.render(element, document.getElementById('root')) */
/* function Sayhello(){
    for(var i = 0;i > 5;i++){
        console.log(i)
    }
}
Sayhello()
 */

/* const person = {
    name: "Mosh",
    walk() {
        console.log(this);
    }
};
person.walk();
// 默认下会指向 Window, 使用bind改变指向为person
const walk = person.walk.bind(person)
walk(); */

/* const job = [
  { id:1, isActive: true},
  { id:2, isActive: true},
  { id:3, isActive: false}
]

const activeJobs = job.filter(job => job.isActive)
const list = [...activeJobs];
console.log(list) */

//map函数
/* 
const colors = ['green', 'red', 'gray', 'pink', 'blue']
const items  = colors.map(color => `<li>${color}</li>`);
console.log(items) */

//解构赋值
/* const user = {
   name: "Lichen",
   age: 30,
   hobby: "编程"
}

const { name, age, hobby } = user
console.log(name, age, hobby) */

/* //展开运算符
let arry1 = [1,2,3];
let arry2 = [4,5,6];
//老的写法
//const arrays = arry1.concat(arry2);
const arrays = [...arry1,'a', ...arry2];
console.log(arrays)
 */

/* 
class Person {
    constructor(name) {
        this.name = name
    }
    walk(){
        console.log("walk");
    }
}

const persons = new Person('Mosh')
persons.walk() */
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
// import Counter from './components/counter'
import App from './App';
import 'bootstrap/dist/css/bootstrap.css';
import 'jquery/dist/jquery'
import 'bootstrap/dist/js/bootstrap.bundle';
import 'font-awesome/css/font-awesome.css';
ReactDOM.render(
  <BrowserRouter>
    <App />
  </BrowserRouter>,
  document.getElementById('root')
);
